

let UIConstants = require('../ui_constants');

class BkpItemModel{
    constructor(total){
        this._id = myTools.genId();
        this._totelLen = total; // chain总长度
        this._beginIdx = 0; // 开始的索引
        this._endIdx = 0; // 终止位置的索引
        this._bkpType = UIConstants.BkpItemType.Hole;
    }

    get id(){
        return this._id;
    }

    get totalLen(){
        return this._totelLen;
    }

    get beginIdx(){
        return this._beginIdx;
    }
    set beginIdx(newIdx){
        this._beginIdx = newIdx;
    }

    set endIdx(newIdx){
        this._endIdx = newIdx;
    }

    get endIdx(){
        return this._endIdx;
    }

    set bkpType(newType){
        this._bkpType = newType;
    }

    get bkpType(){
        return this._bkpType;
    }
}

module.exports = BkpItemModel;
